package org.jeecg.entity.charge;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.enums.charge.InvoiceStatusEnum;
import org.jeecg.enums.common.PayTypeEnum;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * @Description: 发票记录
 * @Author: jeecg-boot
 * @Date:   2019-08-15
 * @Version: V1.0
 */
@Data
@TableName("charge_invoice_request")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="charge_invoice_request对象", description="发票记录")
public class ChargeInvoiceRequest implements Serializable{
    
	/**编号*/
	@TableId(type = IdType.UUID)
    @ApiModelProperty(value = "编号")
	private String id;
	/**请求流水号*/
	@Excel(name = "请求流水号", width = 15)
    @ApiModelProperty(value = "请求流水号")
	private String fpqqlsh;
	/**交易订单号*/
	@Excel(name = "交易订单号", width = 15)
    @ApiModelProperty(value = "交易订单号")
	private String orderNum;
	/**房间ID*/
	@Excel(name = "房间ID", width = 15)
    @ApiModelProperty(value = "房间ID")
	private String roomId;
	/**业主ID*/
	@Excel(name = "业主ID", width = 15)
    @ApiModelProperty(value = "业主ID")
	private String customerId;
	/**公司ID*/
	@Excel(name = "公司ID", width = 15)
    @ApiModelProperty(value = "公司ID")
	private String comId;
	/**0待开票 1开票成功 2 开票中 3 开票失败*/
	@Excel(name = "0待开票 1开票成功 2 开票中 3 开票失败", width = 15)
    @ApiModelProperty(value = "0待开票 1开票成功 2 开票中 3 开票失败")
	private String invoiceStatus;

	@TableField(exist = false)
	private String invoiceStatusStr;

	/**购买方名称*/
	@Excel(name = "购买方名称", width = 15)
    @ApiModelProperty(value = "购买方名称")
	private String gmfMc;
	/**地址*/
	@Excel(name = "地址", width = 15)
    @ApiModelProperty(value = "地址")
	private String address;
	/**开票金额*/
	@Excel(name = "开票金额", width = 15)
    @ApiModelProperty(value = "开票金额")
	private Double money;
	/**合计金额*/
	@Excel(name = "合计金额", width = 15)
    @ApiModelProperty(value = "合计金额")
	private Double hjje;
	/**合计税额*/
	@Excel(name = "合计税额", width = 15)
    @ApiModelProperty(value = "合计税额")
	private Double hjse;
	/**支付方式*/
    @ApiModelProperty(value = "支付方式")
	private Integer payMethod;

	@Excel(name = "支付方式", width = 15)
	@TableField(exist = false)
	private String payMethodStr;

	/**请求内容*/
	@Excel(name = "请求内容", width = 15)
    @ApiModelProperty(value = "请求内容")
	private Object req;
	/**接口回调*/
	@Excel(name = "接口回调", width = 15)
    @ApiModelProperty(value = "接口回调")
	private Object res;
	/**开票请求地址*/
	@Excel(name = "开票请求地址", width = 15)
    @ApiModelProperty(value = "开票请求地址")
	private Object reqUrl;
	/**发票PDF地址*/
	@Excel(name = "发票PDF地址", width = 15)
    @ApiModelProperty(value = "发票PDF地址")
	private Object pdfUrl;
	/**项目ID*/
	@Excel(name = "项目ID", width = 15)
    @ApiModelProperty(value = "项目ID")
	private String projectId;
	/**账单集合*/
	@Excel(name = "账单集合", width = 15)
    @ApiModelProperty(value = "账单集合")
	private String billIds;
	/**fphm*/
	@Excel(name = "fphm", width = 15)
    @ApiModelProperty(value = "fphm")
	private String fphm;
	/**fpdm*/
	@Excel(name = "fpdm", width = 15)
    @ApiModelProperty(value = "fpdm")
	private String fpdm;
	/**fplx*/
	@Excel(name = "fplx", width = 15)
	@ApiModelProperty(value = "fplx")
	private String fplx;
	/**电话*/
	@Excel(name = "电话", width = 15)
    @ApiModelProperty(value = "电话")
	private String tel;
	/**账号*/
	@Excel(name = "账号", width = 15)
    @ApiModelProperty(value = "账号")
	private String account;
	/**纳税人识别号*/
	@Excel(name = "纳税人识别号", width = 15)
    @ApiModelProperty(value = "纳税人识别号")
	private String ein;
	/**邮箱*/
	@Excel(name = "邮箱", width = 15)
    @ApiModelProperty(value = "邮箱")
	private String email;
	/**电子发票回调的开票日期yyyyMMddHHmmss*/
	@Excel(name = "电子发票回调的开票日期yyyyMMddHHmmss", width = 15)
    @ApiModelProperty(value = "电子发票回调的开票日期yyyyMMddHHmmss")
	private String kprq;
	/**凭证对应公司名*/
	@Excel(name = "凭证对应公司名", width = 15)
    @ApiModelProperty(value = "凭证对应公司名")
	private String voucherCompany;
	/**对应nc项目代号*/
	@Excel(name = "对应nc项目代号", width = 15)
    @ApiModelProperty(value = "对应nc项目代号")
	private String voucherItem;
	/**0*/
	@Excel(name = "0", width = 15)
    @ApiModelProperty(value = "0")
	private String filed1;
	/**filed2*/
	@Excel(name = "filed2", width = 15)
    @ApiModelProperty(value = "filed2")
	private String filed2;
	/**filed3*/
	@Excel(name = "filed3", width = 15)
    @ApiModelProperty(value = "filed3")
	private String filed3;
	/**filed4*/
	@Excel(name = "filed4", width = 15)
    @ApiModelProperty(value = "filed4")
	private String filed4;
	/**filed5*/
	@Excel(name = "filed5", width = 15)
    @ApiModelProperty(value = "filed5")
	private String filed5;
	/**filed6*/
	@Excel(name = "filed6", width = 15)
    @ApiModelProperty(value = "filed6")
	private String filed6;
	/**filed7*/
	@Excel(name = "filed7", width = 15)
    @ApiModelProperty(value = "filed7")
	private String filed7;
	/**开票日期*/
	@Excel(name = "开票日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开票日期")
	private java.util.Date makeInvoiceDate;
	/**创建者*/
	@Excel(name = "创建者", width = 15)
    @ApiModelProperty(value = "创建者")
	private String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;
	/**更新者*/
	@Excel(name = "更新者", width = 15)
    @ApiModelProperty(value = "更新者")
	private String updateBy;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;
	/**备注信息*/
	@Excel(name = "备注信息", width = 15)
    @ApiModelProperty(value = "备注信息")
	private String remarks;
	/**删除标记*/
	@Excel(name = "删除标记", width = 15)
    @ApiModelProperty(value = "删除标记")
	private String delFlag;

	/**
	 * 物业公司ID
	 * */
	@TableField(exist = false)
	private String tenantId;

	/** 收费项code charge_feeitem */
	@TableField(exist = false)
	private String feeCode;
	@TableField(exist = false)
	private String feeitemId;
	@TableField(exist = false)
	private String payMode;

	@TableField(exist = false)
	private String projectName;
	@TableField(exist = false)
	private String roomName;
	@TableField(exist = false)
	private String feeitemName;
	@TableField(exist = false)
	private String createName;

	public String getInvoiceStatusStr() {
		return InvoiceStatusEnum.getDesc(this.invoiceStatus);
	}

	public String getPayMethodStr() {
		return PayTypeEnum.getDesc(this.payMethod);
	}
}
